<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        var aList01 = [1, 2, 3, 4, 5, 6];

        // 循环数组里的数据  i是下标索引
        for (var i = 0; i < 6; i++) {
            alert(aList01[i]);
        }


        for (var i in aList01) {
            // i是下标索引
            alert(i);
        }
    </script>
</head>

<body>

</body>

</html>